#电子秤
#能够计算:
#   价格=（毛重-包装重量）*单价
#   包装重量：0.1斤
#   价格=（毛重-0.1）*单价
# 苹果：3元/斤
# 香蕉：5元/斤


def balance(kg,yuan):
    return (kg-0.1)*yuan

banana=balance(10.1,5)
banana2=balance(9.1,5)
print(banana2)

print(balance(7.1,3))












# def price(weight,unitPrice):
#     return (weight-0.1)*unitPrice

# apple=price(10.1,3)   
# print(apple)

# banana=price(10.1,5)  
# print(banana)

